Skip to content

Conversation

sprocketc
Copy link
Member

@sprocketc sprocketc commented Jun 21, 2025

We now use localForage that wraps IndexedDB and also uses localStorage as a fallback storage option. It has has the exact same API as localStorage.

The main difference is that it is async. As a result, the hard part of this PR was to orchestrate the loading process to accommodate that. Fortunately, that also fixed some loading related issues, because we now have a single event that initializes our db.

akiroz.re-frame/storage dependency was removed. We now use custom effects to write a serialized state of the app on a single db key. This is by no means a sophisticated storage approach, but it seems to work fine. If we decide to more than that, we might as well write to IndexedDB directly, or use something like re-posh and skip re-frame's app-db altogether.

Resolves #75

@sprocketc sprocketc marked this pull request as ready for review July 3, 2025 11:31
@sprocketc sprocketc merged commit 6b57ec2 into main Jul 3, 2025
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2025
@sprocketc sprocketc deleted the persist-enhancements branch September 30, 2025 10:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persist enhancements

1 participant